package util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ConfigManager {
    private  static  Properties properties =null;
   static  {
        String configFile = "database.properties";
        InputStream in = ConfigManager.class.getClassLoader().getResourceAsStream(configFile);
        try {
            properties = new Properties();
            properties.load(in);
            in.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String getProperty(String prop){
        return properties.getProperty(prop);
    }
}

